package com.xuecheng.media.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xuecheng.api.media.model.ResourceUrlModel;
import com.xuecheng.api.media.model.dto.LiveCourseDTO;
import com.xuecheng.api.media.model.qo.QueryLiveCourseModel;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import com.xuecheng.media.entity.LiveCourse;

/**
 * <p>
 * 直播课程 服务类
 * </p>
 *
 * @author itcast
 * @since 2021-04-22
 */
public interface LiveCourseService extends IService<LiveCourse> {


    /**
     * 直播列表查询
     *
     * @param params
     * @param model
     * @param companyId
     * @return
     */
    PageVO<LiveCourseDTO> queryLiveCourseList(PageRequestParams params, QueryLiveCourseModel model, Long companyId);

    /**
     * <p>
     * 获取直播推流地址
     * </p>
     *
     * @param coursePubId 课程发布id
     * @param teachplanId 课程计划id
     * @return ResourceUrlModel
     */
    ResourceUrlModel getLivePushUrl(Long coursePubId, Long teachplanId);

    /**
     * <p>
     * 获取直播播流地址
     * </p>
     *
     * @param coursePubId 课程发布id
     * @param teachplanId 课程计划id
     * @return ResourceUrlModel
     */
    ResourceUrlModel getLivePullUrl(Long coursePubId, Long teachplanId);

    /**
     * <p>
     * 根据课程id生成此课程下所有直播章节的直播课程记录
     * </p>
     *
     * @param courseId 课程id
     */
    void createLiveCourseList(Long courseId);
}
